package cool.qingqing.hero.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cool.qingqing.hero.entity.Heros;
import cool.qingqing.hero.service.IHerosService;
import lombok.Getter;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gaoshanqing
 * @since 2023-10-15
 */
@RestController
public class HerosController {
@Autowired
IHerosService herosService;

@GetMapping("heroes")
public List<Heros> heroes(){
    return herosService.list();
}
@PostMapping("heroes")
public void heroes(Heros heros){

}

}
